﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using MySql.Data.MySqlClient;
using System.Data;
using System.Web.Services;
using System.Web.Services.Protocols;

namespace mx.ipn.escom.tt20080015.modelo.db
{
    public class Conexion
    {
        private string nombreDB;
        private string host;
        private string usuario;
        private string claveAcceso;
        protected static MySqlConnection conexion;
        protected static MySqlCommand command;

        protected Conexion()
        {
            nombreDB = global::tt20080015.DBProperties.nombreDB;
            host = global::tt20080015.DBProperties.host;
            usuario = global::tt20080015.DBProperties.usuario;
            claveAcceso = global::tt20080015.DBProperties.claveAcceso;
            conexion = new MySqlConnection();
            conexion.ConnectionString = "Persist Security Info=False; Database=" + 
                nombreDB + ";Data Source=" + host + ";User Id=" + usuario + ";Password=" + claveAcceso;
            command = new MySqlCommand();
            command.Connection = conexion;
            //command.CommandType = CommandType.StoredProcedure;
        }
    }
}
